<?php
class News extends CI_Controller{
	private $per_page_index = 5;
	public function __construct(){
		parent::__construct();
		$this->load->model('model_home');
		if(!Auth::isLoggedIn() ) redirect("/");
		if($this->session->userdata("type_user") != "superadmin") redirect("/");
	}
	function index(){
		$data['title'] = TITLE.' - News';
		$data['tinymce'] = 'y';
		$data['active_admin_news'] = 'y';
		//waktu di save, replace src="../../ dengan base_url().image_tinymce
		
		$this->load->view('admin/news',$data);
	}
	function edit($id=""){
		$data['title'] = TITLE.' - Edit News';
		$data['tinymce'] = 'y';
		$data['active_admin_news'] = 'y';
		
		$this->load->view("admin/news_edit",$data);
	}
}